<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--[if IE 8]>			<html class="ie ie8"> <![endif]-->
<!--[if IE 9]>			<html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!-->	<html> <!--<![endif]-->
<head>

    <!-- Meta -->
    <meta charset="utf-8">
    <meta name="keywords" content="HTML5 Template" />
    <meta name="description" content="">
    <meta name="author" content="">

    <title>DuangBs | 我的订单</title>

    <!-- Mobile Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Favicon -->
    <link rel="shortcut icon" href="/favicon.ico">

    <!-- Google Webfont -->
    <link href="font-awesome-4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='http://fonts.googleapis.com/css?family=Courgette' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,400italic,700,700italic' rel='stylesheet' type='text/css'>

    <!-- CSS -->
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="js/vendor/slick/slick.css">
    <link rel="stylesheet" href="css/prettyphoto.css">
    <link rel="stylesheet" href="js/vendor/owl-carousel/owl.carousel.css">
    <link rel="stylesheet" href="js/vendor/owl-carousel/owl.theme.css">
    <link rel="stylesheet" href="js/vendor/owl-carousel/owl.transitions.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/index.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>

<div class="body">
    <!-- TOPBAR -->
    <div class="topbar">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <ul>
                        <li><a href="./myaccount.jsp">我的账户</a></li>
                        <li><a href="./wishlist_products.html">愿望单</a></li>
                        <li><a href="./checkout.html">付款</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <!-- HEADER -->
    <div class="header">
        <header>
            <div class="container">
                <div class="row">
                    <div class="col-md-4 logo">
                        <a href="#"><img src="images/logo.png" class="img-responsive" alt=""/></a>
                    </div>
                    <div class="col-md-8">
                        <div class="cart-main">
                            <a class="shop-cart"><i class="fa fa-shopping-cart"></i>购物车</a>
                            <div id="cart-main">
                                <ul>
                                    <li>
                                        <img src="images/xtra/3.jpg" alt="" />
                                        <div class="description">
                                            <div class="closeit">X</div>

                                            <a href="./product_single.html">Dolore Vertyusa&reg; Blue navy</a>
                                            <div class="position"><p><span class="currency"><span>$</span>45.99</span><span class="sign">x</span><input type="text" value="1" /></p></div>
                                        </div>
                                        <div class="clearfix"></div>
                                    </li>
                                    <li>
                                        <img src="images/xtra/4.jpg" alt="" />
                                        <div class="description">
                                            <div class="closeit">X</div>

                                            <a href="./product_single.html">Kids' New Balance&reg; for crewkits K1300 sneakers</a>
                                            <div class="position"><p><span class="currency"><span>$</span>59.99</span><span class="sign">x</span><input type="text" value="1" /></p></div>
                                        </div>
                                        <div class="clearfix"></div>
                                    </li>
                                    <li>
                                        <img src="images/xtra/5.jpg" alt="" />
                                        <div class="description">
                                            <div class="closeit">X</div>

                                            <a href="./product_single.html">Girls' Vans&reg; classic slip-on sneakers</a>
                                            <div class="position"><p><span class="currency"><span>$</span>37</span><span class="sign">x</span><input type="text" value="1" /></p></div>
                                        </div>
                                        <div class="clearfix"></div>
                                    </li>
                                </ul>
                                <div class="bottom">
                                    <span class="total">Total: $231</span>
                                    <div class="clearfix"></div>
                                    <a href="./cart.html">Checkout <i class="fa fa-angle-right"></i></a>
                                </div>
                            </div>
                        </div>

                        <form class="search">
                            <input type="search" placeholder="搜索商品">
                            <button type="submit"><i class="fa fa-search"></i></button>
                        </form>
                    </div>
                </div>
            </div>
        </header>

        <!-- NAVMENU -->
        <nav class="container">
            <div id='navmenu'>
                <ul>
                    <li><a href='/index1.jsp'>首页</a></li>
                    <li><a href='/index1.jsp'>商城</a></li>
                    <li class='has-sub'>
                        <a href='#'>团队</a>
                        <ul>
                            <li><a href='./team.html'>队伍</a></li>
                            <li><a href='./team_member.html'>成员</a></li>
                        </ul>
                    </li>
                    <li><a href='./contact.html'>联系我们</a></li>
                </ul>
            </div>
        </nav>
    </div>

    <div class="clearfix space50"></div>

    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
    <%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <!-- WISHLIST CONTENT -->
    <div class="container main-content">
        <div class="row">
            <ul class="bcrumbs">
                <li><a href="#"><i class="fa fa-home"></i></a></li>
                <li><span>我的订单</span></li>
            </ul>
            <div class="clearfix space30"></div>

            <c:forEach var="map" items="${requestScope.userOrders}" varStatus="r">
                <div class="cart-main">
                    <table class="cart-table cart-wishlist">
                        <tbody>
               <c:forEach var="orderLine" items="${map.value}" varStatus="r">
                    <tr>
                        <td>
                            <img style="width: 200px;height: 200px;" src="${orderLine.imgUrl}" alt=""/>
                            <h4>《${orderLine.name}》 </h4>
                            <h4>${orderLine.briefIntro} 来自Duang BookStore,最新珍藏版书籍，欢迎购买和收藏</h4>
                        </td>
                        <td>￥${orderLine.price}</td>
                        <td>${orderLine.quanlity}个</td>
                    </tr>
                </c:forEach>
                        </tbody>
                    </table>
                    <div class="orderCacu">
                        <div class="order">
                            <div>下单时间：${map.key.date}</div>
                            <div>合计：${map.key.totalPrice}</div>
                            <div>订单状态：${map.key.state}</div>
                            <c:if test="${map.key.state=='已付款'}">
                                <form action="/orderReturn" method="get">
                                    <input hidden type="text" name="orderId" value="${map.key.id}"/>
                                    <button class="btn" type="submit">申请退款</button>
                                </form>
                            </c:if>
                            <c:if test="${map.key.state!='已付款'}">
                                <button class="btn btn_state" disabled="disabled">申请退款</button>
                            </c:if>
                        </div>
                    </div>
                </div>
            </c:forEach>

        </div>
    </div>
    <div class="clearfix space80"></div>

    <!-- FOOTER -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="row col-md-7">
                    <div class="col-md-4">
                        <div class="f-widget f-widget1">
                            <h5>Information</h5>
                            <ul class="f-links">
                                <li><a href="#">About Us</a></li>
                                <li><a href="#">Our Specials</a></li>
                                <li><a href="#">Best Sellers</a></li>
                                <li><a href="#">Latest Products</a></li>
                                <li><a href="#">FAQ</a></li>
                                <li><a href="#">Contact Us</a></li>
                            </ul>
                        </div>
                    </div>

                    <div class="col-md-4">
                        <div class="f-widget f-widget2">
                            <h5>My Account</h5>
                            <ul class="f-links">
                                <li><a href="./cart.html">My Cart</a></li>
                                <li><a href="./checkout.html">Checkout</a></li>
                                <li><a href="./wishlist_products.html">Wishlist</a></li>
                                <li><a href="./myaccount.html">My Orders</a></li>
                                <li><a href="#">My Addresses</a></li>
                                <li><a href="./myaccount.html">My Account</a></li>
                            </ul>
                        </div>
                    </div>

                    <div class="col-md-4">
                        <div class="f-widget f-widget3">
                            <h5>Why Choose us?</h5>
                            <div class="f-info">
                                <p><i><img src="images/ico/1.png" alt=""/></i> Fast Service</p>
                                <p><i><img src="images/ico/2.png" alt=""/></i> Trustful Guarantee</p>
                                <p><i><img src="images/ico/3.png" alt=""/></i> 24/7 Support</p>
                                <p><i><img src="images/ico/4.png" alt=""/></i> Secured Payments</p>
                                <p><i><img src="images/ico/5.png" alt=""/></i> 3 Days Money Back</p>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="f-widget f-widget4 col-md-5">
                    <h5>Newsletter</h5>
                    <p>Be the first to sign up for our latest news & promotions:</p>
                    <form class="newsletter">
                        <input type="email" placeholder="Enter your email address">
                        <button type="submit"><i class="fa fa-angle-right"></i></button>
                    </form>
                    <div class="space50"></div>
                    <h5>Follow Us</h5>
                    <ul class="f-social">
                        <li><a href="#" class="fa fa-facebook"></a></li>
                        <li><a href="#" class="fa fa-twitter"></a></li>
                        <li><a href="#" class="fa fa-rss"></a></li>
                        <li><a href="#" class="fa fa-linkedin"></a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="footer-bottom">
            <div class="container">
                <div class="footer-bottom-wrap">
                    <div class="row">
                        <div class="col-md-6">
                            <p>&copy; Copyright 2015. All Rights Reserved.</p>
                        </div>
                        <div class="col-md-6">
                            <ul class="payment">
                                <li><a href="#"><img src="images/ico/p1.png" alt=""/></a></li>
                                <li><a href="#"><img src="images/ico/p2.png" alt=""/></a></li>
                                <li><a href="#"><img src="images/ico/p3.png" alt=""/></a></li>
                                <li><a href="#"><img src="images/ico/p4.png" alt=""/></a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </footer>
</div>

<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/vendor/slick/slick.js"></script>
<script src="js/vendor/isotope/isotope.pkgd.js"></script>
<script src="js/vendor/owl-carousel/owl.carousel.js"></script>
<script src="js/jquery.appear.js"></script>
<script src="js/jquery.inview.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/vendor/flex-slider/jquery.flexslider.js"></script>
<script src="js/vendor/flex-slider/main.js"></script>
<script type="text/javascript" src="js/jquery.countdown.js"></script>
<script src="js/jquery.prettyphoto.js"></script>
<script src="js/main.js"></script>

</body>
</html>
